package cn.ddm.hrm.controller;


import cn.ddm.hrm.services.ISmsVerifyCodeService;
import cn.ddm.hrm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/smsVerifyCode")
public class SmsVerifyCodeController {

    @Autowired
    private ISmsVerifyCodeService smsVerifyCodeService;

    /**
     * 发送图片验证码
     * @param params
     * @return
     */
    @PostMapping
    public AjaxResult verifySmsCode(@RequestBody Map<String,String> params) {
        return smsVerifyCodeService.verifySmsCode(params);
    }

    /**
     * 发送短信验证码
     * @param params
     * @return
     */
    @PostMapping("/sendVerifyCode")
    public AjaxResult sendSmsVerifyCode(@RequestBody Map<String,String> params){
        return smsVerifyCodeService.sendSmsVerifyCode(params);
    }
}
